<template>
	<web-view :src="`https://ghjvr.guhaojiadecor.com?initialIndex=${initialIndex}&panoramaList=${encodeURIComponent(JSON.stringify(panoramaList))}`"></web-view>
  </template>
  
  <script setup>
  import { ref } from 'vue';
  import { onLoad } from '@dcloudio/uni-app'
  
  // 假设从父组件或路由参数中获取 initialIndex
  const initialIndex = ref(0); // 默认展示第一个全景图
  const panoramaList = ref([])
  onLoad((option)=>{
  	if(option) {
  		if(option.initialIndex) {
  			initialIndex.value = option.initialIndex
  		}
  		if(option.panoramaList) {
  			panoramaList.value = JSON.parse(decodeURIComponent(option.panoramaList))
  		}
  		
  	}
  })
  </script>